package com.study.spring.jvm;

/**
 * @author zhang
 * 下午10:32:37
 * TODO 虚拟机栈和本地方法栈内存溢出
 */
public class TestVmStackAndNativeMethod {
    private int stackLength = 1;

    public static void main(String[] args) {
        TestVmStackAndNativeMethod oom = new TestVmStackAndNativeMethod();
        try {
            oom.stackLeak();
        } catch (Throwable e) {
            System.out.println("stack length:" + oom.stackLength);
            throw e;
        }
    }

    private void stackLeak() {
        stackLength++;
    }
}
